﻿namespace Mercury.ParticleEngine
{
    using System;
    using Xunit;
    using FluentAssertions;

    // ReSharper disable InconsistentNaming

    public class StringExtensionsTest
    {
        public class IsNullOrWhitespaceMethod
        {
            [Fact]
            [Trait("Type", "StringExtensions")]
            public void WhenGivenNull_ReturnsTrue()
            {
                const String value = null;

                value.IsNullOrWhitespace().Should().BeTrue();
            }

            [Fact]
            [Trait("Type", "StringExtensions")]
            public void WhenGivenEmptyString_ReturnsTrue()
            {
                const String value = "";

                value.IsNullOrWhitespace().Should().BeTrue();
            }

            [Fact]
            [Trait("Type", "StringExtensions")]
            public void WhenGivenWhitespaceValue_ReturnsTrue()
            {
                const String value = "   ";

                value.IsNullOrWhitespace().Should().BeTrue();
            }

            [Fact]
            [Trait("Type", "StringExtensions")]
            public void WhenGivenValidString_ReturnsFalse()
            {
                const String value = "foo";

                value.IsNullOrWhitespace().Should().BeFalse();
            }
        }
    }

    // ReSharper restore InconsistentNaming
}